package restaurant.gui;

import javax.swing.BoxLayout;
import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.JTabbedPane;

import restaurant.gui.simulation.SimulationPanel;

/**
 * This JPanel contains a JTabbedPabe which shows the different functions
 * performed by the restaurant's manager. It organizes the manager user
 * interface into tabs to make it easier to use the system.
 * 
 * @author Odessa
 */
@SuppressWarnings("serial")
public class InteractionsPanel extends JPanel
{

	/** The frame. */
	@SuppressWarnings("unused")
	private JFrame frame;



	/**
	 * Create the panel and the tabbed pane. It initializes the components and
	 * adds them to the tabbed pane.
	 * 
	 * @param frame the frame.
	 */
	public InteractionsPanel(JFrame frame) {
		this.frame = frame;
		this.setLayout(new BoxLayout(this, BoxLayout.Y_AXIS));

		JTabbedPane tabbedPane = new JTabbedPane();

		JPanel menuPanel = new MenuPanel(frame);
		JPanel menuItemPanel = new MenuItemPanel();
		JPanel reportsPanel = new JPanel();

		tabbedPane.addTab("View Menu", Restaurant.MENU, menuPanel);
		tabbedPane.addTab("Edit Menu Item", Restaurant.EDIT, menuItemPanel);
		tabbedPane.addTab("View Reports", Restaurant.REPORT, reportsPanel);

		// Add the tabbed pane to this panel.
		add(tabbedPane);
		add(new SimulationPanel());
	}

}
